<template>
  <div class="son">
    <!-- {{ fatherAll.money }}-{{ hourse }} -->
    {{ $attrs }}123{{ attr }}
    <Grandson‌ />
  </div>
</template>

<script setup lang='ts' name="son">
import { ref, toRefs, toValue, useAttrs } from 'vue';
import Grandson‌ from './Grandson‌.vue'
const attr = useAttrs()
console.log(attr);
console.log(import.meta.url, '-------');
console.log(import.meta.env, '-------');
// const emit = defineEmits<{ (e: 'changeNum', params: number): void }>()

// emit('changeNum', 1000)
// let n = ref<number | string>(0)
// let props = withDefaults(defineProps<{ fatherAll: object }>(), {
//   fatherAll: () => ({
//     hourse: 2,      // 确保与接口定义一致
//     money: 200000
//   })
// })
// let { fatherAll } = toRefs(props)

// console.log(fatherAll.value);
// let { hourse } = (fatherAll as any).value
</script>

<style scoped>
.son {
  width: 100%;
  height: 100%;
  background-color: azure;
  border: 1px solid red;
  font-size: 28px;
}

.f {
  color: green;
}

.s {
  color: red;
}
</style>